class TokenModel {
  final String username;
  final String name;
  final String role;
  final String token;
  bool authed;

  TokenModel(
      {required this.username,
      required this.name,
      required this.role,
      required this.token,
      this.authed = false});

  factory TokenModel.fromJson(Map<String, dynamic> json) {
    return TokenModel(
        username: json["username"],
        name: json["name"],
        role: json["role"],
        token: json["token"],
        authed: true);
  }
  factory TokenModel.empty() {
    return TokenModel(username: '', name: '', role: '', token: '');
  }
}

class ContactModel {
  final String Friendusername;
  final String Friendname;

  final bool Online;

  bool get isEmpty => Friendusername == '';

  ContactModel(
      {required this.Friendusername,
      required this.Friendname,
      required this.Online});

  factory ContactModel.fromJson(Map<String, dynamic> json) {
    return ContactModel(
        Friendusername: json["Friendusername"],
        Friendname: json["Friendname"],
        Online: json["Online"]);
  }

  factory ContactModel.empty() {
    return ContactModel(Friendusername: '', Friendname: '', Online: false);
  }
}
